With

The @With command can be used to apply default property referencing to any command statements until the @EndWith statement is encountered. This applies solely to hierarchical structures.

Syntax:@With nodename

<statements>

@EndWith

Example

in an OnCapture Event for an Attribute called Butter, to set Butter to dynamic status, you only need put:

@Assign isDynamic = 'Yes'

as opposed to:

@Assign Butter.isDynamic = 'Yes'

which achieves the same end result. However, there may be instances when you wish to use generic or repetitive statements, and avoid needing to include a specific object name. You can use the @With command like this:

@With Butter

@Assign isDynamic = 'Yes'

@DO Test_Ingedients (the name of a procedure)

@EndWith

Regardless of which Event the above commands appear in, the isDynamic statement will then be forced to mean Butter.isDynamic. Similarly, any property referencing statements, WITHOUT node names, that are executed in Test_Ingedients would also be assumed to apply to Butter. The node name can be either the literal node name or the node position. e.g. @With Node[3]